﻿@model string
@{
    var prifix = Model;
    var codespace = ViewContext.RouteData.DataTokens["area"].ToString();
    var entityTypeCode = ViewContext.RouteData.Values["Controller"].ToString();
}
<form id="@(prifix)form1" method="post">
    <input name="Id" class="mini-hidden" />
    <div style="padding-left: 11px; padding-bottom: 5px;">
        <table>
            <tr>
                <td>
                    @Html.IconLabel("Title", entityTypeCode, codespace)
                </td>
                <td colspan="3">
                    <input name="Title" class="mini-textbox" required="true" style="width: 350px;" />
                    @Html.Qtip("Title", entityTypeCode, codespace)
                </td>
            </tr>
            <tr>
                <td>
                    @Html.IconLabel("Type", entityTypeCode, codespace)
                </td>
                <td>
                    <input name="Type" class="mini-textbox" required="true" />
                    @Html.Qtip("Type", entityTypeCode, codespace)
                </td>
                <td>
                    @Html.IconLabel("OntologyId", entityTypeCode, codespace)
                </td>
                <td>
                    <input name="OntologyId" class="mini-combobox" style="width: 100px;"
                           textfield="name" valuefield="id" required="true"
                           data="@Html.OntologiesJsonArray()" />
                    @Html.Qtip("OntologyId", entityTypeCode, codespace)
                </td>
            </tr>
            <tr>
                <td>
                    @Html.IconLabel("NodeId", entityTypeCode, codespace)
                </td>
                <td colspan="3">
                    <input name="NodeId" class="mini-combobox" style="width: 350px;"
                           textfield="name" valuefield="id" required="true"
                           data="@Html.ClientNodesJsonArray()" />
                    @Html.Qtip("NodeId", entityTypeCode, codespace)
                </td>
            </tr>
            <tr>
                <td>
                    @Html.IconLabel("CatalogCode", entityTypeCode, codespace)
                </td>
                <td>
                    <input name="CatalogCode" class="mini-textbox" required="false" />
                    @Html.Qtip("CatalogCode", entityTypeCode, codespace)
                </td>
                <td colspan="2">
                    <input name="IncludeDescendants" class="mini-checkbox"
                           text="@Html.GetProperty("IncludeDescendants", entityTypeCode, codespace).Name"
                           truevalue="true" falsevalue="false" />
                </td>
            </tr>
            <tr>
                <td>
                    @Html.IconLabel("Description", entityTypeCode, codespace)
                </td>
                <td colspan="3">
                    <input name="Description" class="mini-textarea" style="width: 350px;" />
                    @Html.Qtip("Description", entityTypeCode, codespace)
                </td>
            </tr>
        </table>
    </div>
</form>
